import {login} from '@/services'
import {setToken} from '@/utils'

const actions = {
    async login({commit}, code){
        let {access_token, token_type} = await login(code);
        if (access_token){
            // 存储登陆态
            setToken(token_type+access_token)
        }

    }
}

export default {
    namespaced: true,
    actions
}